/**   
* @Title: Header.java
* @Package com.an.pripro
* @Description: TODO(用一句话描述该文件做什么)
* @author antch,861710865@qq.com   
* @date 2017年8月2日 下午3:07:14
* @version V1.0   
*/


package com.an.pripro;

import java.util.HashMap;
import java.util.Map;

/**
* @ClassName: Header
* @Description: TODO(消息定义类)
* @author antch,861710865@qq.com
* @date 2017年8月2日 下午3:07:14
* 
*/

public class Header {

	private int crcCode = 0xabef0101;
	private int length;//消息长度
    private long sessionID;//回话ID
    private byte type;//消息类型
    private byte priority;//消息优先级
    
    private Map<String , Object> attachment = new HashMap<String , Object>();//附件

	public int getCrcCode() {
		return crcCode;
	}

	public void setCrcCode(int crcCode) {
		this.crcCode = crcCode;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public long getSessionID() {
		return sessionID;
	}

	public void setSessionID(long sessionID) {
		this.sessionID = sessionID;
	}

	public byte getType() {
		return type;
	}

	public void setType(byte type) {
		this.type = type;
	}

	public byte getPriority() {
		return priority;
	}

	public void setPriority(byte priority) {
		this.priority = priority;
	}

	public Map<String, Object> getAttachment() {
		return attachment;
	}

	public void setAttachment(Map<String, Object> attachment) {
		this.attachment = attachment;
	}

	@Override
	public String toString() {
		return "Header [crcCode=" + crcCode + ", length=" + length + ", sessionID=" + sessionID + ", type=" + type
				+ ", priority=" + priority + ", attachment=" + attachment + "]";
	}
    
    
}
